<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:73:"D:\phpStudy\WWW\huimei\public/../application/admin\view\member\index.html";i:1640246792;s:64:"D:\phpStudy\WWW\huimei\application\admin\view\public\header.html";i:1555721965;s:64:"D:\phpStudy\WWW\huimei\application\admin\view\public\footer.html";i:1640513393;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="Shortcut Icon"type="image/x-icon"href="favicon.ico">
    <title><?php echo config('WEB_SITE_TITLE'); ?></title>
    <link href="/static/admin/css/bootstrap.css?v=3.3.7" rel="stylesheet">
    <link href="/static/admin/css/font-awesome.min.css?v=4.7.0" rel="stylesheet">
    <link href="/static/admin/css/style.min.css?v=4.1.0" rel="stylesheet">
    <link href="/static/admin/css/cropper.min.css" rel="stylesheet">
    <link href="/static/admin/css/ImgCropping.css" rel="stylesheet">
    <link href="/static/admin/css/plugins/footable/footable.core.css" rel="stylesheet">
    <link href="/static/admin/js/plugins/layui/css/layui.css" rel="stylesheet">
    <link href="/static/admin/js/plugins/viewer/viewer.css" rel="stylesheet">
    <link href="/static/admin/js/plugins/zTree/zTreeStyle.css" rel="stylesheet" >
    <link href="/static/admin/js/plugins/formSelects-v4/formSelects-v4.css" rel="stylesheet" >
    <script src="/static/admin/js/Icon.js"></script>
    <link rel="stylesheet" href="/static/admin/js/plugins/wx-audio/wx-audio.css" >
    <link rel="stylesheet" href="/static/admin/js/plugins/webuploader/webuploader.css" ><!--webUploader上传组件-->
    <link rel="stylesheet" href="/static/admin/js/plugins/webuploader/style.css" ><!--webUploader上传组件-->
    <style type="text/css">
    #chooseicon {margin:20px;}
    #chooseicon ul { margin:5px 0 0 0;}
    #chooseicon ul li{width:41px;height:41px;line-height:41px;border:1px solid #e7e7e7;padding:1px;margin:1px;text-align: center;font-size:18px;}
    #chooseicon ul li:hover{border:1px solid #2c3e50;cursor:pointer;}
    </style>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="ibox float-e-margins">
        <div class="ibox-content">
            <div class="row">
                <!--搜索框开始-->
                <div class="col-sm-12">
                    <div class="layui-form layui-form-item">

                        <div class="layui-col-md6 layui-input-inline" style="margin-top: 5px">
                            <input type="text" id="keyword" class="layui-input search" name="keyword" value="" placeholder="昵称|备注|电话"/>
                        </div>

                        <div class="layui-col-md6 layui-input-inline" style="margin-top: 5px">
                            <input type="text" id="start" class="layui-input search" name="start" onclick="wk.lay_date(this);" readonly  placeholder="注册时间开始"/>
                        </div>

                        <div class="layui-col-md6 layui-input-inline" style="margin-top: 5px">
                            <input type="text" id="end" class="layui-input search" name="end" onclick="wk.lay_date(this);" readonly  placeholder="注册时间结束"/>
                        </div>
                        <div class="layui-input-inline" style="margin-top: 5px">
                            <select name="user_status" class="layui-input">
                                <option value="">不限状态</option>
                                <option value="1">正常</option>
                                <option value="2">冻结</option>
                            </select>
                        </div>
                        <div class="layui-input-inline" style="margin-top: 5px">
                            <select name="user_d_type" class="layui-input">
                                <option value="">不限用户身份</option>
                                <option value="1">普通用户</option>
                                <option value="2">设计师</option>
                                <option value="3">商家</option>
                                <option value="4">客户</option>
                                <option value="5">业务员</option>
                            </select>
                        </div>
                        <div class="layui-input-inline" style="margin-top: 5px">
                            <select name="user_type" class="layui-input">
                                <option value="">不限案例类型</option>
                                <option value="1">普通用户</option>
                                <option value="2">合作商</option>
                                <option value="3">业务员</option>
                                <option value="4">内部员工</option>
                            </select>
                        </div>
                        <div class="layui-input-inline" style="margin-top: 5px">
                            <select name="user_my" class="layui-input">
                                <option value="">不限权限</option>
                                <option value="1">只能看已完成案例</option>
                                <option value="2">能看所有案例</option>
                            </select>
                        </div>
                        <div class="layui-input-inline" style="margin-top: 5px">
                            <select name="indexindex" class="layui-input">
                                <option value="">不限推荐</option>
                                <option value="1">未推荐</option>
                                <option value="2">已推荐</option>
                            </select>
                        </div>
                        <div class="layui-input-inline" style="margin-top: 5px">
                            <select name="user_d_zhiwu" lay-search="">
                                <option value="">不限设计师职务</option>
                                <?php if(is_array($zhiwu) || $zhiwu instanceof \think\Collection || $zhiwu instanceof \think\Paginator): if( count($zhiwu)==0 ) : echo "" ;else: foreach($zhiwu as $key=>$v): ?>
                                <option value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?></option>
                                <?php endforeach; endif; else: echo "" ;endif; ?>
                            </select>
                        </div>
                        <div class="layui-input-inline" style="margin-top: 5px">
                            <select name="room_id"  lay-search="">
                                <option value="">不限设计师分类</option>
                                <?php if(is_array($fenlei) || $fenlei instanceof \think\Collection || $fenlei instanceof \think\Paginator): if( count($fenlei)==0 ) : echo "" ;else: foreach($fenlei as $key=>$v): ?>
                                <option value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?></option>
                                <?php endforeach; endif; else: echo "" ;endif; ?>
                            </select>
                        </div>
                        <div class="layui-input-inline" style="margin-top: 5px">
                            <select name="style_id" lay-search="">
                                <option value="">不限设计师风格</option>
                                <?php if(is_array($styles) || $styles instanceof \think\Collection || $styles instanceof \think\Paginator): if( count($styles)==0 ) : echo "" ;else: foreach($styles as $key=>$v): ?>
                                <option value="<?php echo $v['id']; ?>"><?php echo $v['name']; ?></option>
                                <?php endforeach; endif; else: echo "" ;endif; ?>
                            </select>
                        </div>
                        <div class="layui-input-inline" style="margin-top: 5px">
                            <button class="layui-btn" lay-submit="" lay-filter="LAY-search">立即搜索</button>
                            <button  class="layui-btn layui-btn-normal" id="empty"  lay-submit="" lay-filter="LAY-search">重置</button>
                        </div>
                    </div>
                </div>
                <!--操作框开始-->
                <div class="col-sm-12">
                    <div class="input-group" >
                        <button class="btn btn-primary" type="button" onclick="wk.layer_show('新增用户', '<?php echo url('newAdd'); ?>')">
                            <i class="fa fa-plus"></i> 新增用户
                        </button>
                        <button class="btn btn-primary" type="button" onclick="wk.layer_show('新增设计师', '<?php echo url('newAdd2'); ?>')">
                            <i class="fa fa-plus"></i> 新增设计师
                        </button>
                        <button  class="btn btn-danger m-l-xs" href="javascript:;" data-toggle="dropdown">
                            <i class="fa fa-wrench"></i> 批量操作 <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu layui-anim layui-anim-upbit" role="menu">
                            <li><a  href="javascript:;" class="layuiBtn" data-type="excelAll1">设置优惠文案</a></li>
                            <li><a  href="javascript:;" class="layuiBtn" data-type="excelAll2">设置佣金文案</a></li>
                            <li><a  href="javascript:;" class="layuiBtn" data-type="excelAll3">设置优惠图片</a></li>
                            <li><a  href="javascript:;" class="layuiBtn" data-type="excelAll4">设置佣金图片</a></li>

                            <li><a  href="javascript:;" class="layuiBtn" data-type="ppll1">批量冻结</a></li>
                            <li><a  href="javascript:;" class="layuiBtn" data-type="ppll2">批量解冻</a></li>
                            <li><a  href="javascript:;" class="layuiBtn" data-type="ppll3">批量推荐</a></li>
                            <li><a  href="javascript:;" class="layuiBtn" data-type="ppll4">批量取消推荐</a></li>
                        </ul>
                    </div>
                </div>
                <!--操作框结束-->
            </div>
            <div class="example-wrap">
                <div class="example">
                    <table class="layui-hide" id="test" lay-filter="testReload"></table>
                    <!--操作模板-->
                    <script type="text/html" id="user_status">
                    {{# if(d.user_status == 1){ }}
                    正常
                    {{# } }}
                    {{# if(d.user_status == 2){ }}
                    已冻结
                    {{# } }}
                    </script>
                    <script type="text/html" id="user_d_type">
                    {{# if(d.user_d_type == 1){ }}
                    普通用户
                    {{# } }}
                    {{# if(d.user_d_type == 2){ }}
                    设计师
                    {{# } }}
                    {{# if(d.user_d_type == 3){ }}
                    商家
                    {{# } }}
                    {{# if(d.user_d_type == 4){ }}
                    客户
                    {{# } }}
                    {{# if(d.user_d_type == 5){ }}
                    业务员
                    {{# } }}
                    </script>
                    <script type="text/html" id="user_my">
                    {{# if(d.user_my == 1){ }}
                    已完成的
                    {{# } }}
                    {{# if(d.user_my == 2){ }}
                    所有的
                    {{# } }}
                    </script>
                    <!--图片模板-->
                    <script type="text/html" id="imgTpl">
                        <img src="{{d.user_image}}" class="img-circle table-img" onerror="this.src='/static/admin/images/head_default.gif'"  />
                    </script>
                    <script type="text/html" id="opeBar">
                        {{# if(d.user_status == 1){ }}
                        <a href="javascript:;" onclick="wk.confirm('{{d.user_id}}','<?php echo url('down'); ?>','确定冻结吗?')" class="btn btn-primary btn-xs m-r-xs" title="冻结">冻结</a>
                        {{# } }}
                        {{# if(d.user_status == 2){ }}
                        <a href="javascript:;" onclick="wk.confirm('{{d.user_id}}','<?php echo url('up'); ?>','确定启用吗?')" class="btn btn-warning btn-xs m-r-xs" title="启用">启用</a>
                        {{# } }}
                        {{# if(d.user_d_type == 2){ }}
                            {{# if(d.user_d_index == 1){ }}
                            <a href="javascript:;" onclick="wk.confirm('{{d.user_id}}','<?php echo url('indexshow'); ?>','确定设为推荐在主页面显示吗?')" class="btn btn-primary btn-xs m-r-xs" title="设为推荐">设为推荐</a>
                            {{# } }}
                            {{# if(d.user_d_index == 2){ }}
                            <a href="javascript:;" onclick="wk.confirm('{{d.user_id}}','<?php echo url('indexhide'); ?>','确定取消推荐吗?')" class="btn btn-warning btn-xs m-r-xs" title="取消推荐">取消推荐</a>
                            {{# } }}
                        {{# } }}

                        {{# if(d.user_d_type == 2){ }}
                        <a href="javascript:;" onclick="wk.layer_show('编辑', '<?php echo url('memberDetail2'); ?>?user_id={{d.user_id}}')" class="btn btn-primary btn-xs m-r-xs" title="编辑">编辑</a>
                        <a href="javascript:;" onclick="wk.layer_show('文件设置', '<?php echo url('newBanner'); ?>?user_id={{d.user_id}}')" class="btn btn-primary btn-xs m-r-xs" title="文件设置">文件设置</a>
                        {{# } else{ }}
                        <a href="javascript:;" onclick="wk.layer_show('编辑', '<?php echo url('memberDetail'); ?>?user_id={{d.user_id}}')" class="btn btn-primary btn-xs m-r-xs" title="编辑">编辑</a>
                        {{# } }}

                        <a href="javascript:;" onclick="wk.confirm('{{d.user_id}}','<?php echo url('delu'); ?>','确定删除吗?')" class="btn btn-danger btn-xs m-r-xs" title="删除">删除</a>
                        <a href="javascript:;" onclick="wk.layer_show('案例相关权限设置', '<?php echo url('authCase'); ?>?user_id={{d.user_id}}')" class="btn btn-warning btn-xs m-r-xs" title="案例相关权限设置">权限设置</a>
                    </script>
                </div>
            </div>
        </div>
    </div>
</div>
<div id="headCrop" style="display:none">
    <div class="tailoring-content-one">
        <label title="选择图片" for="chooseImg" class="layui-btn" style="font-weight: normal">
            <input type="file" accept="image/jpg,image/jpeg,image/png" name="file" id="chooseImg" class="hidden" onchange="selectImg(this)"><i class="fa fa-cloud-upload"></i>
            选择图片
        </label>
    </div>
    <div class="ibox-content">
        <div class="tailoring-content">
            <div class="tailoring-content-two">
                <div class="tailoring-box-parcel" style="text-align: center">
                    <img id="tailoringImg">
                    <span class="word" style="position:relative;top:50%;font-size:14px;color: #c2c2c2">仅支持JPG、JPEG、PNG格式的图片文件</span><br>
                    <!--<span class="size" style="position:relative;top:50%;font-size:16px">文件不能大于2MB</span>-->
                </div>
                <div class="preview-box-parcel">
                    <!--<p>图片预览：</p>-->
                    <div class="square previewImg"></div>
                    <div class="circular previewImg"></div>
                </div>
            </div>
        </div>
    </div>
    <div class="modal-footer">
        <span class="layui-btn cropper-reset-btn" style="float:left">复位</span>
        <span class="layui-btn zoomIn" style="float:left">放大</span>
        <span class="layui-btn zoomOut" style="float:left">缩小</span>
        <span class="layui-btn cropper-rotate-btn" style="float:left">旋转</span>
        <span class="layui-btn cropper-scaleX-btn" style="float:left">换向</span>
        <span class="layui-btn " id="sureCut"><i class="fa fa-save"></i> 保存</span>
        <span class="layui-btn layui-btn-primary" onclick="layer.closeAll()"><i class="fa fa-close"></i> 关闭</span>
    </div>
</div>
<script src="/static/admin/js/jquery.min.js?v=2.1.4"></script>
<script src="/static/admin/js/bootstrap.js?v=3.3.7"></script>
<script src="/static/admin/js/jquery.form.js"></script>
<script src="/static/admin/js/plugins/layui/layui.js"></script>
<script src="/static/admin/js/wk.js"></script>
<script src="/static/admin/js/cropper.min.js"></script>
<script src="/static/admin/js/plugins/viewer/viewer.js"></script>
<script src="/static/admin/js/common.js"></script>
<script src="/static/admin/js/plugins/webuploader/webuploader.js"></script><!--webUploader上传组件-->
<script src="/static/admin/js/plugins/zTree/jquery.ztree.core-3.5.js"></script>
<script src="/static/admin/js/plugins/zTree/jquery.ztree.excheck-3.5.js"></script>
<!--<script src="/static/admin/js/plugins/zTree/jquery.ztree.exedit-3.5.js"></script>-->
<script src="/static/admin/js/plugins/formSelects-v4/formSelects-v4.js"></script>
<!--<script src="/static/admin/js/plugins/wangEditor-3.1.1/release/wangEditor.js" ></script>-->
<script src="/static/admin/js/plugins/xm-select/xm-select.js"></script>
<script src="https://cdn.jsdelivr.net/npm/wangeditor@latest/dist/wangEditor.min.js" ></script>
<script src="/static/admin/js/plugins/wx-audio/wx-audio.js" ></script>
<script>
    layui.config({
        base: '/src/' //静态资源所在路径
    }).extend({
        index: 'index', //主入口模块
        interact : 'interact'//三级联动
    }).use(['index','interact']),function(){};
</script>
<script>
    //关闭自动填充
    // $('input').attr('autocomplete',"off");

    //view初始化查看图片
    $(function(){
        $('.img-circle').viewer();
    })
</script>
<script>
    //layui三级联动
    layui.use(['form'], function() {
        var form = layui.form
                , layer = layui.layer
        form.on('select(province)', function(data){
            getArea("province",data.value);
        });
        form.on('select(city)', function(data){
            getArea("city",data.value);
        });
        function getArea(type,id){
            $.ajax({
                url:"<?php echo url('admin/Base/place'); ?>",
                dataType:"json",
                data:'id='+id,
                type:'post',
                success:function(res){
                    var opt = '';
                    $.each(res.msg,function(key,vo){
                        opt = opt+"<option value="+vo.district_id+">"+vo.district+"</option>";
                    })
                    if(type=="province"){
                        $("#city").empty();
                        $("#city").append('<option value="">---- 请选择市 ----</option>');
                        $("#district").empty();
                        $("#district").append('<option value="">---- 请选择区 ----</option>');
                        $("#city").append(opt);
                        form.render('select');
                    }else if(type == "city"){
                        $("#district").empty();
                        $("#district").append('<option value="">---- 请选择区 ----</option>');
                        $("#district").append(opt);
                        form.render('select');
                    }
                }
            })
        }
    })
</script>
<script>
    //layui公共操作
    layui.use(['form','table'], function() {
        var form = layui.form
            , layer = layui.layer
            , table = layui.table

        //重置搜索框
        $('#empty').on('click', function () {
            $('.search').val('');
            // $(".search").trigger("chosen:updated");
            $('select').each(function (i, j) {
                $(j).find("option:selected").attr("selected", false);
                form.render('select')
            })
        });
        //表格排序
        table.on('sort(demo)', function(obj){
            table.reload('testReload', {
                initSort: obj //记录初始排序，如果不设的话，将无法标记表头的排序状态
                ,where: { //请求参数
                    field: obj.field //排序字段
                    ,order: obj.type //排序方式
                }
            });
        });
        //监听搜索
        form.on('submit(LAY-search)', function (data) {
            //执行重载
            table.reload('testReload', {
                page: {
                    curr: 1 //重新从第 1 页开始
                }
                ,where: data.field
            });
        });
    });
    //获取serialize数据转对象
    // $.fn.parseForm=function(){
    //     var serializeObj={};
    //     var array=this.serializeArray();
    //     var str=this.serialize();
    //     $(array).each(function(){
    //         if(serializeObj[this.name]){
    //             if($.isArray(serializeObj[this.name])){
    //                 serializeObj[this.name].push(this.value);
    //             }else{
    //                 serializeObj[this.name]=[serializeObj[this.name],this.value];
    //             }
    //         }else{
    //             serializeObj[this.name]=this.value;
    //         }
    //     });
    //     return serializeObj;
    // }
</script>

<script>
    //layui渲染数据表格
    layui.use('table', function () {
        var table = layui.table
                , form = layui.form;
        table.render({
            elem: '#test'
            , url: '<?php echo url("Member/index"); ?>'
            ,response: {
                statusCode: 220 //成功的状态码，默认：0
            }
            , page: true
            , size: 'lg' //sm小尺寸的表格 lg大尺寸
            , cellMinWidth: 100
            , limits: [5, 10, 15, 20, 25, 300]
            , limit: "<?php echo config('pages'); ?>"
            , loading: true
            , autoSort: false
            , id: 'testReload'
            , cols: [[
                {type: 'checkbox', fixed: 'left'},
                  {type:'numbers', width: 60, title: '序号'}
                , {field: 'user_id', width: 60, title: 'ID', align: 'center'}
                , {field: 'user_username', width: 80, title: '昵称', align: 'center'}
                , {field: 'user_d_name', width: 100, title: '设计师姓名', align: 'center'}
                , {field: 'roomnames', width: '100', title: '分类', align: 'center'}
                , {field: 'zhiwu_name', width: '100', title: '职务', align: 'center'}
                , {field: 'user_d_zhiwu_name', width: '90', title: '职务描述', align: 'center'}
                , {field: 'stylenames', width: '100', title: '风格', align: 'center'}
                , {field: 'user_d_money_min', width: '100', title: '设计费', align: 'center', edit: 'test'}
                , {field: 'user_d_money_max', width: '100', title: '设计费', align: 'center', edit: 'test'}
                , {field: 'user_d_company', width: 100, title: '设计师公司', align: 'center'}
                , {field: 'user_d_type', width: '100', title: '用户身份', align: 'center',toolbar: '#user_d_type'}
                , {field: 'user_image', width: 80, title: '头像', align: 'center', templet: '#imgTpl'}
                , {field: 'user_phone', width: 100, title: '手机号码', align: 'center', edit: 'test'}
                , {field: 'user_sort', width: '120', title: '排序(可编辑)', align: 'center', edit: 'test'}
                , {field: 'user_type_name', width: '100', title: '用户案例类型', align: 'center'}
                , {field: 'user_my', width: '100', title: '案例权限', align: 'center',toolbar: '#user_my'}
                , {field: 'user_time', width: '', title: '注册时间', sort: true, align: 'center'}
                , {field: 'user_logintime', width: '200', title: '最新访问时间', sort: true, align: 'center'}
                , {field: 'user_status', width: 90, title: '用户状态', align: 'center',toolbar: '#user_status'}
                , {fixed: 'right', width:380, title: '操作', align: 'center', toolbar: '#opeBar'}
            ]]
            ,done: function (res, curr, count) {
                $('.img-circle').viewer({
                    url: 'data-original',
                });
            }
        });
        //批量操作
        //批量操作
        var $ = layui.$, active = {
            //批量导出订单
            excelAll1:function () {
                var ids = getIds();
                var types = getTypes();
                if(types != ''){
                    alert('只有设计师才可以设置！');
                    return;
                }
                if(ids == ''){
                    alert('选择数据不能为空！');
                    return;
                }else{
                    wk.layer_show('设置优惠图片', '<?php echo url('excelAll1'); ?>?user_id=' + ids);
                }

            },
            //批量导出订单
            excelAll2:function () {
                var ids = getIds();
                var types = getTypes();
                if(types != ''){
                    alert('只有设计师才可以设置！');
                    return;
                }
                if(ids == ''){
                    alert('选择数据不能为空！');
                    return;
                }else{
                    wk.layer_show('设置优惠图片', '<?php echo url('excelAll2'); ?>?user_id=' + ids);
                }

            },
            //批量导出订单
            excelAll3:function () {
                var ids = getIds();
                var types = getTypes();
                if(types != ''){
                    alert('只有设计师才可以设置！');
                    return;
                }
                if(ids == ''){
                    alert('选择数据不能为空！');
                    return;
                }else{
                    wk.layer_show('设置优惠图片', '<?php echo url('excelAll3'); ?>?user_id=' + ids);
                }

            },
            //批量导出订单
            excelAll4:function () {
                var ids = getIds();
                var types = getTypes();
                if(types != ''){
                    alert('只有设计师才可以设置！');
                    return;
                }
                if(ids == ''){
                    alert('选择数据不能为空！');
                    return;
                }else{
                    wk.layer_show('设置佣金图片', '<?php echo url('excelAll4'); ?>?user_id=' + ids);
                }

            },
            ppll1:function () {
                wk.change(getIds(),'<?php echo url('ppll'); ?>','user_status',2);
            },
            ppll2:function () {
                wk.change(getIds(),'<?php echo url('ppll'); ?>','user_status',1);
            },
            ppll3:function () {
                wk.change(getIds(),'<?php echo url('ppll'); ?>','user_d_index',2);
            },
            ppll4:function () {
                wk.change(getIds(),'<?php echo url('ppll'); ?>','user_d_index',1);
            },
            //全部导出
        };
        //监听单元格编辑---排序
        table.on('edit(testReload)', function(obj){
            var value = obj.value //得到修改后的值
                ,data = obj.data //得到所在行所有键值
                ,field = obj.field; //得到字段
            wk.change(data.user_id,"<?php echo url('updateSort'); ?>",field,value);
        });
        $('.layuiBtn').on('click', function () {
            var type = $(this).data('type');
            active[type] ? active[type].call(this) : '';
        });
        var getIds = function () {
            var ids = [];
            var checkStatus = table.checkStatus('testReload')
                    ,data = checkStatus.data;
            $.each(data,function(index,item){
                ids.push(item['user_id'])
            });
            return ids;
        };
        var getTypes = function () {
            var ids = [];
            var checkStatus = table.checkStatus('testReload')
                    ,data = checkStatus.data;
            $.each(data,function(index,item){
                if(item['user_d_type'] != 2){
                    ids.push(item['user_d_type'])
                }
            });
            return ids;
        }
        table.on('sort(testReload)', function(obj) { //注：sort 是工具条事件名，test 是 table 原始容器的属性 lay-filter="对应的值"
            //尽管我们的 table 自带排序功能，但并没有请求服务端。
            //有些时候，你可能需要根据当前排序的字段，重新向服务端发送请求，从而实现服务端排序，如：
            table.reload("testReload", {
                initSort : obj, //记录初始排序，如果不设的话，将无法标记表头的排序状态。
                where : { //请求参数（注意：这里面的参数可任意定义，并非下面固定的格式）
                    field : obj.field, //排序字段
                    order : obj.type  //排序方式
                }
            });
        });
    });
</script>
</body>
</html>